/* 基础动画定义 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.scale-in {
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义工具类实现 */
.content-auto {
    content-visibility: auto;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.text-balance {
    text-wrap: balance;
}

/* 响应式布局补充 */
@media (max-width: 768px) {
    .grid-cols-1-sm-2 {
        grid-template-columns: 1fr;
    }

    @media (min-width: 640px) {
        .grid-cols-1-sm-2 {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

@media (min-width: 1024px) {
    .grid-cols-1-sm-2-lg-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 组件样式补充 */
.food-card {
    transition: all 0.3s ease;
}

.food-card:hover {
    transform: translateY(-4px);
}

.category-btn {
    transition: all 0.2s ease;
}

.add-to-cart {
    transition: all 0.2s ease;
}

/* 购物车动画 */
#cartCount {
    transition: all 0.2s ease;
}

/* 按钮交互效果 */
.btn-primary {
    @apply bg-primary text-white py-3 rounded-lg font-medium hover:bg-primary/90 transition-colors;
}

.btn-secondary {
    @apply bg-secondary text-white py-3 rounded-lg font-medium hover:bg-secondary/90 transition-colors;
}

.btn-outline {
    @apply bg-white border border-neutral-300 py-3 rounded-lg font-medium text-neutral-700 hover:bg-neutral-50 transition-colors;
}
